package com.umeng.lx.Adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.mymvp.view.adapter.BaseAdapter;
import com.example.mymvp.view.adapter.BaseViewHolder;
import com.example.mymvp.view.ui.fragment.BaseMvpFramgent;
import com.umeng.lx.Bean.DemoList;
import com.umeng.lx.R;

import java.util.List;

public class MyAdapter extends BaseAdapter<DemoList.ListDTO> {

    public MyAdapter(List<DemoList.ListDTO> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    public void bindData(BaseViewHolder holder, DemoList.ListDTO listDTO) {
        ImageView img = holder.getView(R.id.Iv_img);
        TextView name = holder.getView(R.id.Tv_name);

        Glide.with(context).load(listDTO.getThumb() ).into(img);
        name.setText(listDTO.getName());
    }
}
